import request from '@/utils/request'

// 查询科目/期初列表
export function listSubject(query) {
  return request({
    url: '/subject/subject/list',
    method: 'get',
    params: query
  })
}

// 查询科目/期初详细
export function getSubject(id) {
  return request({
    url: '/subject/subject/' + id,
    method: 'get'
  })
}
// 查询科目/期初科目下拉框
export function selectListBySubject() {
  return request({
    url: '/subject/subject/selectSubject',
    method: 'get'
  })
}

// 新增科目/期初
export function addSubject(data) {
  return request({
    url: '/subject/subject',
    method: 'post',
    data: data
  })
}

// 修改科目/期初
export function updateSubject(data) {
  return request({
    url: '/subject/subject',
    method: 'put',
    data: data
  })
}

// 删除科目/期初
export function delSubject(id) {
  return request({
    url: '/subject/subject/' + id,
    method: 'delete'
  })
}
